package com.umakr.ax.app.web;

import com.umakr.ax.common.service.PluginCouponService;
import com.umakr.ax.core.base.AbstractController;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 * 优惠券
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
@Controller
@RequestMapping("/api/pluginCoupon")
public class PluginCouponAppController extends AbstractController {

	@Autowired
	PluginCouponService pluginCouponService;

	/**
	 * 商家已发布的所有优惠券
	 * @param modelMap
     * @return
     */
	@GetMapping("/listCouponsByHxrTel")
	@ApiOperation(value = "获取商家优惠券列表")
	public Object listCouponsByHxrTel(ModelMap modelMap, String hxrTel) {
		return setSuccessModelMap(modelMap,pluginCouponService.listCouponsByHxrTel(hxrTel));
	}

}